package org.robotfish.geometry;

import org.ejml.simple.SimpleMatrix;
import org.robotfish.utils.SVGDocument;
import org.w3c.dom.Comment;
import org.w3c.dom.Element;

/**
 * uSES ALL COORDINATES to transforms points.
 * @author Mart
 */
public class TransformationXYZ extends TransformationFork<TransformationXY> {

	@Override
	public int getCoordinate() {
		return 3;
	}

	public void clearArcs() {
		for (TransformationXY t:segments) {
			t.clearArcs();
		}
	}
	
	@Override
	public void appendSVGElements(SVGDocument doc, Element parent, double arcLength) {
		
		Comment comment = doc.createComment(getClass().getName()+".appendSVGElements: layers="+segments.size());
		parent.appendChild(comment);
		
//		SimpleMatrix translation = new SimpleMatrix(new double[][] {{1}, {1}});;
		
		for (TransformationXY t:segments) {
			// create a group
//	        Element group = doc.createGroup(translation.scale(t.coordinateValue));
	        Element group = doc.createGroup();
	        parent.appendChild(group);		
			t.appendSVGElements(doc, group, arcLength);
		}
	}

	/**
	 * Method for instance that has coordinate = 2 (Z)
	 * @param alpha0 enne põlve selgroo suund
	 * @param p põlve asukoht
	 * @param ray põlve väljuva osa suund
	 * @param stretchRegion Piirkonna raadius ümber murdekoha, mida venitatakse
	 */
	public void addJointData(double alpha0, double p, SimpleMatrix ray, double stretchRegion) {

	
	}
	
	
}
